cpufreq.c: shut up compiler about cpufreq_dom
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 29 Oct 2008 16:58:05 +0000 (16:58 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 29 Oct 2008 16:58:05 +0000 (16:58 +0000)
Some versions of GCC are too stupid to figure out that cpufreq_dom is
only used if !!domexist and always set in that case, and complain that
it may be used uninitialised.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen/drivers/cpufreq/cpufreq.c

index eb88e1744be470393c6b5d2cd8840d569e523e38..7020ad50a144c2e3c50b2e794850fddfc1d9d6ec 100644 (file)
@@ -80,7 +80,7 @@ int cpufreq_add_cpu(unsigned int cpu)
     unsigned int dom, domexist = 0;
     unsigned int j;
     struct list_head *pos;
-    struct cpufreq_dom *cpufreq_dom;
+    struct cpufreq_dom *cpufreq_dom = NULL;
     struct cpufreq_policy new_policy;
     struct cpufreq_policy *policy;
     struct processor_performance *perf = &processor_pminfo[cpu]->perf;